package com.qidianit.mes.pro.mapper;

import com.qidianit.mes.dto.WorkFlowDTO;
import com.qidianit.mes.pojo.pro.WorkFlow;
import com.qidianit.mes.vo.WorkFlowPageVo;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * Package Path: com.qidianit.mes.pro.mapper
 * Author: Alhz
 * Description:
 * Date: 2025/9/17 16:43
 */
@Mapper
public interface WorkFlowMapper {
    /**
     * 分页查询
     * @param workFlowPageVo
     * @return
     */
    List<WorkFlow> selectWorkFlowPage(WorkFlowPageVo workFlowPageVo);

    /**
     * 根据工艺编号查询单个工艺信息
     * @param code
     * @return
     */
    WorkFlow selectWorkFlowByCode(String code);

    /**
     * 新增工艺流程
     * @param workFlow
     * @return
     */
    int addWorkFlow(WorkFlow workFlow);

    /**
     * 编辑工艺流程
     * @param workFlow
     * @return
     */
    int updateWorkFlow(WorkFlow workFlow);

    /**
     * 根据id删除单个工艺
     * @param id
     * @return
     */
    int deleteWorkFlowById(Long id);

    /**
     * 批量删除多个工艺
     * @param ids
     * @return
     */
    int batchDeleteWorkFlow(Long[] ids);


    /**
     * 9.24  根据产品编码 查询对应的工艺路线
     * @param productCode
     * @return
     */
    List<WorkFlowDTO>  selectWorkflowByProductCode(String productCode);
}
